﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace AL100.BankApplication.BLL
{
    /// <summary>
    /// Test Account Strategy which withdraws 1,2 or 3 depending on 
    /// the account's type.
    /// </summary>
    public class AccountTestWithdrawStrategy : StrategyBase<AccountBase>
    {
        /// <summary>
        /// Executes the specified target.
        /// </summary>
        /// <param name="target">The target.</param>
        public override void Execute(AccountBase target)
        {
            if (target is SimpleAccount)
            {
                target.Withdraw(1);
            }
            else if (target is SilverAccount)
            {
                target.Withdraw(2);
            }
            else if (target is GoldAccount)
            {
                target.Withdraw(3);
            }

        }
    }
}
